package com.cdhk.controller;

import com.ty.basic.constant.ApiPathConstant;
import com.ty.basic.response.ResponseResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import com.cdhk.service.TestMappingService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;


/**
 * The type Test controller.
 */
@RestController
@Api(tags = "xxx服务")
@RequestMapping(ApiPathConstant.VERSION_ONE_PATH + "test")
public class TestController {

    @Resource
    private TestMappingService testMappingService;

    /**
     * Xxx response result.
     *
     * @param response the response
     * @return the response result
     */
    @GetMapping("/one")
    @ApiOperation(value = "one", produces = "application/json; charset=utf-8")
    public ResponseResult one(HttpServletResponse response) {
        return ResponseResult.success(testMappingService.testFunc());
    }
}
